package com.example.mqttdevicesimulator;

import org.eclipse.paho.client.mqttv3.MqttException;

/**
 * This interface is used to unifying all device activity.
 */
public interface DeviceActivity {

    /**
     * Initialize UI.
     */
    void initUI();

    /**
     * Initialize MQTT Client.
     *
     * @throws MqttException
     */
    void initClient() throws MqttException;

    /**
     * Send deviceInfo to the broker, and subscribe the AssignRoom topic to get roomId to be
     * subscribed.
     */
    void registerDevice();

    /**
     * Subscribe the {roomId} topic.
     */
    void registerRoom();

    /**
     * Subscribe AssignRoom topic.
     */
    void registerAssignment();

    /**
     * Start MQTT service, get broker address, connect to broker.
     */
    void startMqttService();

}
